package vipcard.meichehui.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import vipcard.meichehui.domain.CardRemarks;
import vipcard.meichehui.domain.VipVo;

import java.util.List;

//用户信息
@Mapper

@Component
public interface VipVoMapper extends BaseMapper<VipVo> {

    @Select("select carnumber,username from sys_wg where username=#{username}")
    List<VipVo> findallByUsername(String username);

    @Insert("INSERT INTO card_roll (id, remarks, uid, status, status_date)  VALUES (#{id}, #{remarks}, #{uid},#{status}, #{status_date})")
    Integer addcard(@Param("id") Integer id,@Param("remarks") String remarks,@Param("uid") String uid
            ,@Param( "status") String status,@Param("status_date") String status_date);

    @Select("select * from card_roll where uid =#{uid}")
    List<CardRemarks> selectbyone(@Param("uid") String uid);


    @Select("select id from sys_wg where carnumber=#{carnumber}")
    String selectCarnum(String carnumber);

    @Select("select * from ")
    VipVo selectBycarnumber();

}
